{% extends "Super.tpl" %}
{% block title %}Java考试系统{% endblock %}
{%block subtitle%}学员管理{%endblock%}
{%block suburl%}manager_faq{%endblock%}
{%block superhref%}manager{%endblock%}
{%block supertitle%}综合管理{%endblock%}
{%block rightsubtitle%}考题管理{%endblock%}
{% block content %}
<script type="text/javascript" src="static/js/student.js"></script>
<style>
    .th {
        text-align: center;
    }
</style>
<div class="container-fluid">
    <div class="side-body">
        <div class="card-body" style="position:fixed;z-index:99;left: 20%;width: 60%;">
            <div class="modal-active" id="warning" style="display: none;">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                    aria-hidden="true" id="miniclose">×</span>
                            </button>
                            <h4 class="modal-title">商品信息</h4>
                        </div>
                        <div class="modal-body">
                            <div class="form-group" align="center">
                                <form enctype="multipart/form-data" method="post" id="udreateinfo"
                                      class="form-horizontal">
                                    <p style="font-size: large; ">注意:删除操作不可恢复,请谨慎使用!</p>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">姓名: </label>
                                        <div class="col-sm-6">
                                            <input type="text" class="form-control" name="name" id="rname"
                                                   placeholder="必填">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">身份证: </label>
                                        <div class="col-sm-6">

                                            <input type="text" class="form-control" name="ident" id="rident"
                                                   placeholder="必填">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">密码: </label>
                                        <div class="col-sm-6">

                                            <input type="text" class="form-control" name="password" id="rpassword"
                                                   placeholder="必填">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">得分: </label>
                                        <div class="col-sm-6">
                                            <input type="number" class="form-control" name="points" id="rpoints"
                                                   placeholder="选填">
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">头像: </label>
                                        <div class="col-sm-6">

                                            <input type="file" class="form-control" name="img" placeholder="选填">
                                        </div>
                                    </div>
                                    <div>
                                        <div class="radio3 radio-check radio-inline">
                                            <input type="radio" id="radio1" class="reffect" name="reffect"
                                                   value="option1">
                                            <label for="radio1">
                                                可参加考试
                                            </label>
                                        </div>
                                        <div class="radio3 radio-check radio-success radio-inline">
                                            <input type="radio" id="radio2" class="reffect" name="reffect"
                                                   value="option2">
                                            <label for="radio2">
                                                不可参加考试
                                            </label>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary" style="display: none"></button>
                            <button type="button" class="btn btn-danger" id="rdelete">删除</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal" id="rcancle">取消
                            </button>
                            <button type="button" class="btn btn-primary" id="rsure">确定</button>

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="card-body" style="position:fixed;z-index:99;left: 20%;width: 60%;">
            <div class="modal-active" id="create" style="display: none;">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="miniclose2"><span
                                    aria-hidden="true">×</span>
                            </button>
                            <h4 class="modal-title">新增学员</h4>
                        </div>
                        <div class="modal-body">
                            <div class="form-group" align="center">
                                <form enctype="multipart/form-data" method="post" id="createinfo"
                                      class="form-horizontal">
                                    <p style="font-size: large; ">请填写需要增加的学员信息</p>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">姓名: </label>
                                        <div class="col-sm-6">
                                            <input type="text" name="name" class="form-control" id="cname"
                                                   placeholder="必填">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">身份证: </label>
                                        <div class="col-sm-6">
                                            <input type="text" name="ident" class="form-control" id="cident"
                                                   placeholder="身份证必须添加为18位">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">密码: </label>
                                        <div class="col-sm-6">
                                            <input type="text" name="password" class="form-control" id="cpassword"
                                                   placeholder="必填">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">头像: </label>
                                        <div class="col-sm-6">
                                            <input type="file" name="img" class="form-control" id="cimage"
                                                   placeholder="选填">
                                        </div>
                                    </div>
                                    <div>
                                        <div class="radio3 radio-check radio-inline">
                                            <input type="radio" id="radio11" class="ceffect" name="reffect" checked>
                                            <label for="radio11">
                                                可参加考试
                                            </label>
                                        </div>
                                        <div class="radio3 radio-check radio-success radio-inline">
                                            <input type="radio" id="radio22" class="ceffect" name="reffect">
                                            <label for="radio22">
                                                不可参加考试
                                            </label>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary" style="display: none"></button>
                            <button type="button" class="btn btn-default" data-dismiss="modal" id="ccancle">取消
                            </button>
                            <button type="button" class="btn btn-primary" id="csure">确定</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row" style="text-align: center">
            <div class="col-xs-12">
                <div class="card">
                    <div class="card-header">

                        <div class="card-title">
                            <div class="title">学员详情</div>
                        </div>
                        <div class="pull-right card-action">
                            <div class="btn-group" role="group">
                                <button type="button" class="btn btn-info" id="createstudent"
                                        style="font-weight: bold;color: whitesmoke;border-radius: 8px">新增学员
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="card-body">
                        <table class="datatable table table-bordered" width="100%">
                            <thead>
                            <tr>
                                <th class="th">头像</th>
                                <th class="th">编号</th>
                                <th class="th">姓名</th>
                                <th class="th">身份证</th>
                                <th class="th">密码</th>
                                <th class="th">得分</th>
                                <th class="th">报名日期</th>
                                <th class="th">可参加考试</th>
                                <th class="th">操作</th>
                            </tr>
                            </thead>
                            <tfoot>
                            <tr>
                                <th class="th">头像</th>
                                <th class="th">编号</th>
                                <th class="th">姓名</th>
                                <th class="th">身份证</th>
                                <th class="th">密码</th>
                                <th class="th">得分</th>
                                <th class="th">报名日期</th>
                                <th class="th">可参加考试</th>
                                <th class="th">操作</th>
                            </tr>
                            </tfoot>
                            <tbody>
                            {% for i in list %}
                            <tr>
                                <td width="8%">
                                    <a onmouseout="document.getElementById('image').style.display='none'"
                                       onmouseover="showpic('{{i.Image}}')">预览</a>
                                </td>
                                <td width="5%">{{i.Id}}</td>
                                <td width="8%">{{i.Name}}</td>
                                <td width="15%">{{i.Ident}}</td>
                                <td width="5%">{{i.Password}}</td>
                                <td width="5%">{{i.Points}}</td>
                                <td width="15%">{{i.Create_time}}</td>
                                <td width="8%">
                                    {% if i.Effect != 1%}
                                    <span style="color: darkred">已参加考试</span>
                                    {%else%}
                                    <span style="color: dodgerblue">可参加考试</span>
                                    {%endif%}
                                </td>
                                <th class="th" width="10%">
                                    <button onclick="modify(this)" style="width: 80%;border-radius: 10px"
                                            class="btn-primary"
                                            value="{{i.Id}}">修改
                                    </button>
                                </th>
                            </tr>
                            {% endfor %}
                            </tbody>
                        </table>

                    </div>
                </div>
            </div>
            <img id="image" style="display:none;border:dotted 1px green;position: fixed;width: 20%;top: 200px;
                left:40%">

        </div>

    </div>
</div>

{% endblock %}
